package com.letv.core.db;

import android.content.Context;

public class DBManager {

//	private Context context = BaseApplication.getInstance();
	private Context context;

	private DBManager() {

	}

	private DBManager(Context context) {
		this.context = context;
	}

	private static DBManager instance = new DBManager();
	
	
	public static  DBManager getInstance() {
		return instance;
	}

	public static  DBManager getInstance(Context context) {
		if(null == instance)
		{
			instance = new DBManager(context);
		}
		return instance;
	}


    private PlayRecordHandler playTrace = new PlayRecordHandler(context);
    
    private FavoriteTraceHandler favoriteTrace = new FavoriteTraceHandler(context);
    
    private DownloadTraceHandler downloadTrace = new DownloadTraceHandler(context);
    
    private FestivalImageTraceHandler festivalImageTrace = new FestivalImageTraceHandler(context);
    

    private LocalVideoTraceHandler localVideoTrace = new LocalVideoTraceHandler(context);
//    
    private LiveBookTraceHandler liveBookTrace = new LiveBookTraceHandler(context);
//    
    private DialogMsgTraceHandler dialogMsgTrace = new DialogMsgTraceHandler(context);
//    
//    private LocalCacheTraceHandler localCacheTrace = new LocalCacheTraceHandler(context);
//    
//    private TopChannelsTraceHandler topChannelsTrace = new TopChannelsTraceHandler(context);
//
    private WorldCupTraceHandler worldCupTrace = new WorldCupTraceHandler(context);
    
    private ChannelListHandler channelListTrace=new ChannelListHandler(context);
    
    private ChannelHisListHandler channelHisListTrace=new ChannelHisListHandler(context);
    
	public PlayRecordHandler getPlayTrace() {
		return playTrace;
	}

	public DownloadTraceHandler getDownloadTrace() {
		return downloadTrace;
	}

	public DownloadTraceHandler getDownloadTrace(Context context) {
		downloadTrace = new DownloadTraceHandler(context);
		return downloadTrace;
	}

	public FavoriteTraceHandler getFavoriteTrace() {
		return favoriteTrace;
	}

	public FestivalImageTraceHandler getFestivalImageTrace() {
		return festivalImageTrace;
	}
	
	/**
	 * sumin.zhao 下载模块本地视频使用
	 */
	public LocalVideoTraceHandler getLocalVideoTrace(){
		return localVideoTrace;
	}
	
	/**
	 * 直播预约
	 */

    public WorldCupTraceHandler getWorldCupTrace() { return worldCupTrace; }

	public ChannelListHandler getChannelListTrace() {
		return channelListTrace;
	}

	public ChannelHisListHandler getChannelHisListTrace() {
		return channelHisListTrace;
	}

        
}
